package com.itheima.polymorpic.practice02;

public class Test3Polymorpic {
    public static void main(String[] args) {
        F f = new Z();
        f.method();
        Z z =(Z) f;
        z.show();

    }
}

class F {
    public void method() {
        System.out.println("F...method");
    }
}

class Z extends F {
    public void method() {
        System.out.println("Z...method");
    }

    public void show() {
        System.out.println("我是子类特有的方法...show");
    }
}